Home:ALL Converter>TimeZone Date Formatting Issue

TimeZone Date Formatting Issue

Ask Time:2020-02-24T01:19:20         Author:Ahmed M. Hassan

Json Formatter

I'm trying to get a date from a string with multiple time zones, It works without any problems if the API returns zones with abbreviations like CST or UTC but it fails if it returns EET

let timeString = "17:32 (EET)"

let formatter = DateFormatter()
formatter.dateFormat = "HH:mm (zzz)"
let time = formatter.date(from: timeString) // return nil

Any idea what is the issue might be?!

Author:Ahmed M. Hassan,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/60364808/timezone-date-formatting-issue
yy